package com.lo.dao;

import com.lo.entity.CourseWithTCHName;
import com.lo.entity.TextualMaterial;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import javax.xml.soap.Text;
import java.util.List;

@Repository
public interface TextualMaterialMapper {
    List<TextualMaterial> selectById(@Param("id") Long id);
    int insert(TextualMaterial textualMaterial);
    List<TextualMaterial> selectAll();
    int deleteById(@Param("id")Long id);

    int updateTextIsDelete(@Param("id") Long id);
    int updateTextExamine(@Param("id")Long id);
    int updateText(TextualMaterial textualMaterial);

    //限制4个
    List<CourseWithTCHName> selectAllTexts();

    List<CourseWithTCHName> selectOrdinaryTexts();

    List<CourseWithTCHName> selectVipTexts();

    List<CourseWithTCHName> selectTextByTid(@Param("tid") Long id);

    List<CourseWithTCHName> selectAllTextsWithPage(String search);

    List<CourseWithTCHName> selectOrdinaryTextsWithPage(String search);

    List<CourseWithTCHName> selectVipTextsWithPage(String search);

    List<CourseWithTCHName> selectEngineeringTextWithPage(String search);

    List<CourseWithTCHName> selectScienceTextWithPage(String search);

    List<CourseWithTCHName> selectLiteratureTextWithPage(String search);

    List<CourseWithTCHName> selectLawTextWithPage(String search);

    List<CourseWithTCHName> selectAllNotExamineTextual(String search);

    List<CourseWithTCHName> selectAllDeletingTextual(String search);
    int updateTextIsDelete2Zero(@Param("id") Long id);

    Long textOrdinaryCount();
    Long textVipCount();

}
